<?php
require_once('../class/class.pegawai.php');
require_once('../class/class.golongan.php');
require_once('../class/class.jabatan.php');

if(isset($_REQUEST['logged'])){
	session_start();
	$nip=$_SESSION['nip'];
	$pegawaiDao= new PegawaiDao();
	$golonganDao= new GolonganDao();
	$pegawai=$pegawaiDao->getPegawai($nip);
	$golongan= $golonganDao->getGolongan($pegawai['gol']);

	$jabatanDao= new JabatanDao();
	$jabatan=$jabatanDao->getJabatan($nip);


	$data=array(
		'nama' => $pegawai['nama'],
		'gol' => $golongan['nmgol'],
		'jabatan' =>$jabatan,
		'nip' => $nip,
		);

	echo json_encode($data);
}

?>